//#include <QGuiApplication>
#include <QtWidgets/QApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QIcon>
#include <iostream>
#pragma execution_character_set("utf-8")
#include <QTimer>
#include "systimer.h"
//#include "dumpfile.h"

int main(int argc, char *argv[])
{
    //InitMinDump();    //调试产生dump文件

	QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    //QGuiApplication app(argc, argv);
    QApplication app(argc, argv);
    app.setWindowIcon(QIcon(":/icon/hwsys.png"));

    qmlRegisterType<Systimer>("Union.hw.Systimer", 1, 0, "Systimer");
    qmlRegisterType<QTimer>("timer",1, 0, "Timer");
    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    if (engine.rootObjects().isEmpty())
        return -1;
    return app.exec();
}
